;; -*- mode: emacs-lisp; coding: gbk-dos -*-

;; ispell on win32 ;;
;; Making sure your personal dictionaries get used
(setq ispell-process-directory (expand-file-name "~/"))
(setq ispell-dictionary-alist
      '((nil        "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
	("english"  "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
	("american" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "american") nil iso-8859-1)
	("UK-xlg"   "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "UK-xlg") nil iso-8859-1)
	("US-xlg"   "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "US-xlg") nil iso-8859-1)))
(require 'ispell)
(setq ispell-program-name "aspell")
(setq ispell-extra-args '("--sug-mode=ultra"))
(setq-default ispell-local-dictionary "american")

(setq  hippie-expand-try-functions-list
       (append hippie-expand-try-functions-list
	       (list 'ispell-complete-word )))

(flyspell-mode)
;; ispell on win32 end here ;;

(require 'wdired)
(autoload 'wdired-change-to-wdired-mode "wdired")
(define-key dired-mode-map "r"
  'wdired-change-to-wdired-mode)

(require 'w32-browser)
(eval-after-load "dired"
  '(define-key dired-mode-map [f4] (lambda ()
				     (interactive)
				     (w32-browser
				      (dired-replace-in-string
				       "/" "\\"
				       (dired-get-filename))))))

;; easier printing
(require 'w32-winprint)
(require 'htmlize-view)
(htmlize-view-add-to-files-menu)

